package com.it.myd.bean.box.world;

import com.it.myd.bean.main.User;

import java.util.List;
import java.util.Random;

public abstract class Resource extends MyObject{
    private String Res_Name;
    private String Res_Type;
    private String Res_MaxHp;
    private String Res_Hp;
    private String Res_Top;
    private String Res_Left;
    private String Res_Rec;//回复
    private String Res_Output;//产出
    private String Creattime;
    private String Overtime;
    private User CreatUser;
    private User UseUser;
    private String Res_State;//1未使用 2使用中 3已使用完

    public Resource(Resource resource) {
        Res_Name = resource.getRes_Name();
        Res_Type = resource.getRes_Type();
        Res_MaxHp = resource.getRes_MaxHp();
        Res_Hp = resource.getRes_Hp();
        Res_Top = resource.getRes_Top();
        Res_Left = resource.getRes_Left();
        Res_Rec = resource.getRes_Rec();
        Res_Output = resource.getRes_Output();
        Creattime = resource.getCreattime();
        Overtime = resource.getOvertime();
        CreatUser = resource.getCreatUser();
        UseUser = resource.getUseUser();
        Res_State = resource.getRes_State();
    }

    public abstract List<Material> getMaterial(String o_output,String n_output);
    public abstract List<Material> dead();

    public String getRes_State() {
        return Res_State;
    }

    public void setRes_State(String res_State) {
        Res_State = res_State;
    }

    public Resource(){
        Random random = new Random();
        int top = random.nextInt(400);
        int left = random.nextInt(700);
        Res_Top = String.valueOf(top);
        Res_Left = String.valueOf(left);
    }

    public Resource(String top,String left){
        Res_Top = String.valueOf(top);
        Res_Left = String.valueOf(left);
    }

    public String getRes_Name() {
        return Res_Name;
    }
    public void setRes_Name(String res_Name) {
        Res_Name = res_Name;
    }
    public String getRes_Type() {
        return Res_Type;
    }
    public void setRes_Type(String res_Type) {
        Res_Type = res_Type;
        setType(res_Type);
    }
    public String getRes_MaxHp() {
        return Res_MaxHp;
    }
    public void setRes_MaxHp(String res_MaxHp) {
        Res_MaxHp = res_MaxHp;
    }
    public String getRes_Hp() {
        return Res_Hp;
    }
    public void setRes_Hp(String res_Hp) {
        Res_Hp = res_Hp;
    }
    public String getRes_Top() {
        return Res_Top;
    }

    public void setRes_Top(String res_Top) {
        Res_Top = res_Top;
    }

    public String getRes_Left() {
        return Res_Left;
    }

    public void setRes_Left(String res_Left) {
        Res_Left = res_Left;
    }

    public String getRes_Rec() {
        return Res_Rec;
    }

    public void setRes_Rec(String res_Rec) {
        Res_Rec = res_Rec;
    }

    public String getRes_Output() {
        return Res_Output;
    }

    public void setRes_Output(String res_Output) {
        Res_Output = res_Output;
    }

    public String getCreattime() {
        return Creattime;
    }

    public void setCreattime(String creattime) {
        this.Creattime = creattime;
    }

    public String getOvertime() {
        return Overtime;
    }

    public void setOvertime(String overtime) {
        this.Overtime = overtime;
    }

    public User getCreatUser() {
        return CreatUser;
    }

    public void setCreatUser(User creatUser) {
        CreatUser = creatUser;
    }

    public User getUseUser() {
        return UseUser;
    }

    public void setUseUser(User useUser) {
        UseUser = useUser;
    }
}
